package chatclient_01;

import javax.swing.JScrollPane;
import javax.swing.JTextPane;
import javax.swing.text.StyledDocument;

public class MessagePane extends JScrollPane
{
  private static final long serialVersionUID = 1L;
  private StyledDocument document;

  public MessagePane()
  {
    JTextPane chatTextPane = new JTextPane();
    chatTextPane.setEditable(false);
    chatTextPane.setToolTipText("Personal messages");
    chatTextPane.setFocusable(false);
    chatTextPane.setRequestFocusEnabled(false);
    setViewportView(chatTextPane);
    this.document = chatTextPane.getStyledDocument();
  }

  public StyledDocument getDocument() {
    return this.document;
  }
}